Week 11- CSS/XHTML/Web Design
DAY 1
  • CSS= Cascading Style Sheets
  • Earlier versions of XHTML combine elements of style within the page itself
    • o CSS allowed content and style to be separated
    • W3C created CSS to replace HTML tables, font tags, frames and other presentational tags of HTML elements
    • By keeping the design in separate files that were linked to the HTML files you reduce the likelihood of your page designs falling apart over time as different contributors add to the webpage.
    • One CSS file can be used to set the style and format for numerous different webpages.
    • CSS code consists of a selector and a declaration:
      • o Selector- HTML tag to style sheet will change
      • o Declaration- What the style actually is and what to do with it.

RULES
  • Internal/embedded
    • o Style characteristics are embedded in the HEAD section; used when a single page requires a unique style sheet.
    • External/linked
      • o Connection made via the link tag; uses optional TYPE attribute to specify the media type
      • Imported
        • o Allows for using style sheets for other sources
        • Incline
          • o Least flexible; each element must be tagged

DAY 2
  • In CSS file (paragraph)
    • o P. rightà p{text-align: right;}
    • ID selector is for if you want your style to be used in a specific section of the body.
    • <DIV> selector is used to group sections together.

WHAT YOU CAN CHANGE
  • BACKGROUND: {background-…}
    • o Color
    • o Image
    • o Repeat
    • o Attachment
    • o Position
    • FONT: {font-…}
      • o Style
      • o Variant
      • o Weight
      • o Size/line-height
      • o Family
      • TEXT:
        • o Color
        • o Direction
        • o Text-Align
        • o Text-Indent

        • Properties
          • o Margin
          • o Margin-top
          • o Margin-left
          • o Margin-right
          • o Margin-bottom

CASCADING- Specificity, order and hierarchy